class Stream:
    def __init__(self):
        self.callbacks = []
        self.data = []

    def КegisterСllback(self, callback):
        self.callbacks.append(callback)

    def UnregisterСallback(self, callback):
        self.callbacks.remove(callback)

    def Send(self, data):
        self.data.append(data)
        for callback in self.callbacks:
            callback(data)

    def GetData(self):
        return self.data

    def ClearData(self):
        self.data = []

    def __iter__(self):
        return iter(self.data)
